<%@page import="lib_model.Product.Products"%>
<%@page import="lib_model.Order.Orders_bill_details"%>
<%@page import="lib_model.WareHouse.Warehouse"%>
<%@page import="lib_model.Order.Orders_bill_type"%>
<%@page import="lib_model.Customer.Customer"%>
<%@page import="lib_model.Account.Account_warehouse"%>
<%@page import="java.util.ArrayList"%>
<%@page import="lib_model.Orther.ReturnObj"%>
<%@page import="lib_model.Order.Orders_bill"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<jsp:include page="../templates/Admin.jsp"></jsp:include>
Orders Bill Details
<jsp:include page="../templates/Title.jsp"></jsp:include>
<jsp:include page="../templates/StyleAd.jsp"></jsp:include>
<div class="body-center w960">
<h2 class="title-show">Orders Bill Details</h2>
<%
	try {

		int id = Integer.parseInt(request.getParameter("id"));
		Orders_bill_details bills = new Orders_bill_details();
		ReturnObj rs = bills.GetBy_OrderBillId(id);
		ArrayList<Orders_bill_details> arr = (ArrayList<Orders_bill_details>) rs.ObjResult;
		if (arr.size() > 0) {
%>
<table class="tb">
	<thead>
		<tr>
			<th align="left" width="20%">Order ID</th>
			<th align="left" width="20%">Product</th>
			<th align="left" width="20%">Warehouse</th>
			<th align="left" width="20%">Quantity</th>
		</tr>
	</thead>
	<tbody>
		<%
			for (Orders_bill_details bill : arr) {
		%>
		<tr>
			<td><b><%=bill.id%></b></td>
			<td><%=((Products) ((new Products(
								bill.product_id_ref)).GetInformation().ObjResult)).name%></td>
			<td><%=((Warehouse) ((new Warehouse(
								bill.orders_bill_id_ref)).GetInformation().ObjResult)).name%></td>
			<td><%=bill.quantity%></td>
		</tr>
		<%
			}
		%>
	</tbody>
</table>
<%
	} else {
%>
<h2>This bill not exist</h2>
<%
	}
	} catch (NumberFormatException e) {
		e.printStackTrace();
%><h2>This bill not exist</h2>
<%
	}
%>
</div>
<jsp:include page="../templates/Footer.jsp"></jsp:include>